<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>离职员工评价管理</title>
	<meta name="decorator" content="default"/>
	<style type="text/css">
		.detailtr{
			overflow:hidden;white-space:nowrap;width:260px;text-overflow:ellipsis;
		}
		.detail{
			width:340px;min-height:100px;word-wrap:break-word;
		}
	</style>
	<script type="text/javascript">
		global.bossPassword = "${fns:getStore().bossPassword}";
		$(document).ready(function() {
			$("#contentTable tbody tr").click(function(){
				var detail = $("#detail-" +this.id).html();
				var name = $("#name-" +this.id).html();
				$("#popupDialog h3 font").html(name);
				$("#popupDialog .detail").html(detail);
				$('#popupDialog').popup('open');
			});
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
	</script>
</head>
<body>
	<div class="icon-buttons">
		<a data-role="button" data-inline="true" data-icon="back" data-iconpos="notext"  href="${ctx}">返回</a>
	</div>
	<form:form id="searchForm" modelAttribute="storeEmployeeLeftComment" action="${ctx}/employee/storeEmployeeLeftComment/" method="post">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<input type="button" value="离职员工评价添加" data-inline="true" onclick="bossPasswordPopup('${ctx}/employee/storeEmployeeLeftComment/form')">
		<label>查询离职员工</label>&nbsp;&nbsp;
		<fieldset data-role="controlgroup" data-type="horizontal" data-inline="true">
	        <input type="radio" name="status" id="radio-choice-a" value="0" ${empty status || status == 0 ? "checked" : ""}>
	        <label for="radio-choice-a">按身份证查询</label>
	        <input type="radio" name="status" id="radio-choice-b" value="1" ${status == 1 ? "checked" : ""}>
	        <label for="radio-choice-b">按姓名查询</label>
	        <input type="radio" name="status" id="radio-choice-c" value="2" ${status == 2 ? "checked" : ""}>
	        <label for="radio-choice-c">按手机查询</label>
		</fieldset>
		<input id="searchName" name="searchName" type="search" value="${searchName}"/>
		<input id="btnSubmit" type="submit" value="查询" data-inline="true"/>
	</form:form>
	<tags:message content="${message}"/>
	<table id="contentTable" data-role="table" class="ui-responsive table-stroke">
		<thead><tr><th>店面名称</th><th>员工名称</th><th>评价时间</th><th>评价</th></tr></thead>
		<tbody>
		<c:forEach items="${page.list}" var="storeEmployeeLeftComment">
			<tr id="${storeEmployeeLeftComment.id}">
				<td>${storeEmployeeLeftComment.store.name}</td>
				<td><font id="name-${storeEmployeeLeftComment.id}">${storeEmployeeLeftComment.employee.name}</font></td>
				<td>${fns:formatDate(storeEmployeeLeftComment.comment_date, "yyyy-MM-dd")}</td>
				<td style="width:300px;">
					<p id="detail-${storeEmployeeLeftComment.id}" class="detailtr">${storeEmployeeLeftComment.comment}<p>
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
	
	<div data-role="popup" id="popupDialog" data-overlay-theme="a" data-theme="c" data-dismissible="false" style="max-width:600px;" class="ui-corner-all">
	    <div data-role="header" data-theme="a" class="ui-corner-top">
	        <h1>离职评价</h1>
	    </div>
	    <div data-role="content" data-theme="d" class="ui-corner-bottom ui-content">
	    	<h3>当前员工：<font></font></h3>
	    	<h3>离职评价：</h3>
	    	<p class="detail"></p>
	        <a href="#" data-role="button" data-inline="true" data-rel="back" data-theme="c">关闭</a>
	    </div>
    </div>
</body>
</html>
